<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>权限模板</title>
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" media="screen" />
    <script src="../lib/jquery-3.3.1.min.js" type="text/javascript" ></script>
    <script src="../lib/layui/layui.js" type="text/javascript" ></script>
    <script src="../js/cdfaceacs/authTemplateMgr.js" type="text/javascript" ></script>
    <script type="text/html" id="barOperate">
        <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
    </script>
</head>
<body style="background-color:white;">
<div id="uploadDiv" style="display: none">
    <form class="layui-form" lay-filter="resource_form" id="resource_form" style="margin-top:5%">
        <input style="display: none" id="id" name="id">
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 100px">权限模板名称:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="name" id="templateName" autocomplete="off" lay-verify="required"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 100px">有效开始时间:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="startDate" id="startDate" autocomplete="off" lay-verify="required"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 100px">有效结束时间:</label>
            <div class="layui-input-inline">
                <input class="layui-input" name="endDate" id="endDate" autocomplete="off" lay-verify="required"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 100px">每日通行时段:</label>
            <div class="layui-input-inline">
                <div style="display: flex;width: 500px">
                    <input type="checkbox" id="sd1" lay-filter="sd1" lay-skin="primary" title="时段1" >
                    <input style="margin-left: 50px" disabled="true" class="layui-input" name="selection1Start" id="selection1Start" autocomplete="off" />
                    <span style="margin-left: 10px;margin-right: 10px">至</span>
                    <input class="layui-input" name="selection1End" disabled="true" id="selection1End" autocomplete="off" />
                </div>
                <div style="display: flex;width: 500px">
                    <input type="checkbox" id="sd2" lay-filter="sd2" lay-skin="primary" title="时段2" >
                    <input style="margin-left: 50px" disabled="true" class="layui-input" name="selection2Start" id="selection2Start" autocomplete="off" />
                    <span style="margin-left: 10px;margin-right: 10px">至</span>
                    <input class="layui-input" disabled="true" name="selection2End" id="selection2End" autocomplete="off" />
                </div>
                <div style="display: flex;width: 500px">
                    <input type="checkbox" id="sd3" lay-filter="sd3" lay-skin="primary" title="时段3" >
                    <input style="margin-left: 50px" disabled="true" class="layui-input" name="selection3Start" id="selection3Start" autocomplete="off" />
                    <span style="margin-left: 10px;margin-right: 10px">至</span>
                    <input class="layui-input" disabled="true" name="selection3End" id="selection3End" autocomplete="off" />
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 100px">星期控制:</label>
            <div class="layui-input-inline" style="width: 500px" id="weekControl">
                <input type="checkbox" name="xq1" lay-skin="primary" title="星期一" >
                <input type="checkbox" name="xq2" lay-skin="primary" title="星期二">
                <input type="checkbox" name="xq3" lay-skin="primary" title="星期三" >
                <input type="checkbox" name="xq4" lay-skin="primary" title="星期四" >
                <input type="checkbox" name="xq5" lay-skin="primary" title="星期五" >
                <input type="checkbox" name="xq6" lay-skin="primary" title="星期六" >
                <input type="checkbox" name="xq7" lay-skin="primary" title="星期日" >
            </div>
        </div>
        <div class='layui-input-block' style="margin-top: 20px;margin-left: 27%">
            <button class="layui-btn" id="upload_form" lay-submit="" lay-filter="upload_form">提交</button>
            <button class="layui-btn"  id="cancel_form">取消</button>
        </div>
    </form>
</div>

<div>
    <form class="layui-form" lay-filter="serch_form">
        <div class="layui-input-inline" >
            <input id="name" class="layui-input" autocomplete="off" placeholder="请输入权限模板名称">
        </div>
        <div class="layui-input-inline">
            <button class="layui-btn" lay-submit="" lay-filter="query_device" >查询</button>
            <button class="layui-btn" type="button" onclick="addAuthTemplate()">添加权限模板</button>
            <button class="layui-btn"  type="button" onclick="reload()">重置</button>
        </div>
    </form>
    <table id="authTemplateTable" lay-filter="authTemplateTable">
    </table>
</div>

</body>
</html>